<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field="scene_id">
            {foreach name="scene_list" item="vo"  index="i" }
            <li {if condition="$i eq 1"}class='active'{/if}><a  href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
            {/foreach}
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="customer_table">
                        <div id="toolbar" class="toolbar">
                            {:build_toolbar('refresh,add')}


                            {if $auth->check('facrm/customer/index/import')}
                            <a href="javascript:;" data-url="{:url('facrm/customer.index/import')}" class="btn btn-danger btn-dialog  " title="{:__('批量导入')}"><i class="fa fa-upload"></i> {:__('导入')}</a>
                            {/if}

                            <div class="dropdown btn-group ">
                                <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('操作')}</a>
                                <ul class="dropdown-menu text-left" role="menu">
                                    <li class="{:$auth->check('facrm/customer/index/discard')?'':'hide'}">
                                        <a class="btn  btn-link  btn-discard  dropdown-toggle btn-disabled disabled" data-url="facrm/customer/index/discard">
                                            <i class="fa fa-close"></i> {:__('放入公海')}</a>
                                    </li>
                                    <li class="{:$auth->check('facrm/customer/index/divert')?'':'hide'}">
                                        <a href="javascript:;" data-url="facrm/customer/index/divert" class="btn btn-link  btn-divert btn-disabled disabled " title="{:__('转移客户')}">
                                            <i class="fa fa-mail-reply-all"></i> {:__('转移客户')}</a>
                                    <li>
                                    <li class="{:$auth->check('facrm/apps/email/sends')?'':'hide'}">
                                        <a class="btn btn-link  btn-disabled disabled btn-send-emails  "
                                           href="javascript:;" data-title="{:__('批量发邮件')}"
                                           data-types="customer"
                                           data-url="facrm/apps/email/sends"
                                           data-params=""><i class="fa fa-at fa-fw"></i> {:__('批量发邮件')}</a>
                                    </li>

                                    <li class="{:$auth->check('facrm/apps/sms/sends')?'':'hide'}">
                                        <a class="btn btn-link  btn-disabled disabled btn-send-emails  "
                                           href="javascript:;" data-title="{:__('批量发短息')}"
                                           data-types="customer"
                                           data-url="facrm/apps/sms/sends"
                                           data-params=""><i class="fa fa-envelope-o fa-fw"></i>  {:__('批量发短息')}</a>
                                    </li>
                                    <li class="{:$auth->check('facrm/customer/index/del')?'':'hide'}">
                                        <a class="btn  btn-link  btn-dels dropdown-toggle btn-disabled disabled"
                                           data-url="facrm/customer/index/del"><i class="fa fa-trash"></i> {:__('批量删除')}</a>
                                    </li>
									<li class="{:$auth->check('facrm/customer/index/merge')?'':'hide'}">
                                        <a href="javascript:;" data-url="facrm/customer/index/merge" class="btn btn-link  btn-merge btn-disabled disabled " title="{:__('合并客户')}">
                                            <i class="fa fa-mail-reply-all"></i> {:__('合并客户')}</a>
                                    <li>



                                </ul>
                            </div>

                            <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('facrm/customer/index/recyclebin')?'':'hide'}"
                               href="{:url('facrm/customer.index/recyclebin')}" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('回收站')}</a>

                            {if $auth->check('facrm/customer/index/recover')}
                            <a href="javascript:;" data-url="{:url('facrm/customer.index/recover')}" class="btn btn-danger btn-dialog  " title="{:__('离职员工客户资料回收')}">{:__('资料回收')}</a>
                            {/if}

                        </div>
                        <table id="customer" class="table table-striped table-bordered table-hover table-nowrap"
                               data-operate-edit="{:$auth->check('facrm/customer/index/edit')}"
                               data-operate-del="{:$auth->check('facrm/customer/index/del')}"
                               data-operate-add="{:$auth->check('facrm/customer/index/add')}"
                               data-operate-record="{:$auth->check('facrm/customer/record/add')}"
                               data-operate-discard="{:$auth->check('facrm/customer/index/discard')}"
                               width="100%">
                        </table>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<script>
    var levelList={:json_encode($levelList)};
    var industryList={:json_encode($industryList)};
    var sourceList={:json_encode($sourceList)};
    var scene_list={:json_encode($scene_list)};
    var from_type="{:input('from_type')}";
</script>